import { defineStore } from "pinia";
export const useSearchStore = defineStore('search', {
    state: () => ({
        searchlist: [] as any[], // 存储搜索数据的数组
        searchlength: 0 as number,
    }),
    getters: {

    },
    actions: {
        async addSearchList(query: any[]) {
            // 将获取的数据存到searchlist中
            this.searchlist= query 
        },
        addSearchLenght(query:number) {
            // 将获取的数据存到searchlist中
            this.searchlength= query
        }
    },
});